<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-html</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-html可以解析html -->
        <p v-html="content"></p>

        <!-- 这个只能解析文本 -->
        <p v-text="content"></p>
    </div>

    <script>
        var app = new Vue({
            el:"#app",
            data:{
                content:"<a href='https://www.baidu.com'>百度</a>"
            }
        })
    </script>
    
</body>
</html>